package com.shoux.api.web.entity;

import io.swagger.annotations.ApiModelProperty;
import lombok.Data;


/**
 * @author SA
 * @version 1.0
 * @ClassName MsgEntity.java
 * @Description
 * @createTime 2021年05月14日 11:30:00
 */
@Data
public class MsgEntity {

    /**
     * 状态 true/false
     */
    @ApiModelProperty("状态")
    private Boolean status;
    /**
     * 状态码 枚举类
     */
    @ApiModelProperty("返回状态code")
    private String code;
    /**
     * 自定义消息
     */
    @ApiModelProperty("返回消息")
    private String msg;
    /**
     * 数据 传输数据时使用
     */
    @ApiModelProperty("返回数据")
    private Object data;


    public MsgEntity(Boolean status) {
        this.status = status;
    }

    public MsgEntity(Boolean status, String msg) {
        this.status = status;
        this.msg = msg;
    }

    public MsgEntity(Boolean status, Object data) {
        this.status = status;
        this.data = data;
    }

    public MsgEntity(Boolean status, String code, String msg) {
        this.status = status;
        this.code = code;
        this.msg = msg;
    }

    public MsgEntity(Boolean status, String code, String msg, Object data) {
        this.status = status;
        this.code = code;
        this.data = data;
        this.msg = msg;
    }

    public MsgEntity() {
    }
}
